﻿/**
 * class Main
 * 系统的入口 
 * */
package cn.nkjobsearch.main;

import java.util.ArrayList;

import cn.nkjobsearch.convert.City;
import cn.nkjobsearch.convert.ConvertData;
import cn.nkjobsearch.convert.KeywordIndex;
import cn.nkjobsearch.search.Search;
import cn.nkjobsearch.html.Com51JobController;
import cn.nkjobsearch.html.ComChinaHRController;
import cn.nkjobsearch.html.ComZhilianController;
import cn.nkjobsearch.jena.NKJSJena;
import cn.nkjobsearch.mysql.MysqlConn;

public class Main {
	static void getId(){
		ComChinaHRController chrController = new ComChinaHRController();
		chrController.startGetID();
		chrController.startGetHTML();

		ComZhilianController czpController = new ComZhilianController();
		czpController.startGetID();
		czpController.startGetHTML();

		Com51JobController job51Controller = new Com51JobController();
		job51Controller.startGetID();
		job51Controller.startGetHTML();
	}
	
	static void convertData(int couvertNum) {
		ConvertData da = new ConvertData();
		da.go(couvertNum);
	}
	
	static void search() {
		Search s = new Search();
//		s.go("java软件工程师",extendKeyword,jobCategory,City.getCityCode(city),extendCity,salary, exp, pubDate, edu, jobNature);
//		s.go("数据库管理员");
	}
	
	static void jena() {
		NKJSJena jn = new NKJSJena();
		if(true) {
			ArrayList<int[]> rs = jn.findKeyword(1);
			for (int i = 0; i < rs.size(); i++) {
				int o[] = rs.get(i);
				System.out.println(o[0] + "\t" + o[1]);
			}
		}
		
		if(true) {
			ArrayList<Integer> rs2 = jn.findCity(10, false);
			for (int i = 0; i < rs2.size(); i++) {
				System.out.println(rs2.get(i));
			}
		}
	}
	
	static void test() {
		String jobID = "200810300258870000572008-12-03";
		String out = "http://jobs.chinahr.com/html/" + jobID.substring(20, 27)
		+ "/" + jobID.substring(28, 30) + "/" + jobID.substring(0,20) + ".htm";
		System.out.println(out);
	}
	
	public static void main(String[] args) { 
		test();
//		getId();
//		convertData(1);
//		search();
//		jena();
		System.out.println("Main Over!");
	}
}